package com.example.sys.entity.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RoleDto {
    public interface insert {
    }

    ;

    public interface update {
    }

    /**
     * 主键
     */
    private Long roleId;
    /**
     * 角色名称
     */
    @Length(min = 1, max = 20, message = "角色名称字符在1-20个之内", groups = {RoleDto.insert.class, RoleDto.update.class})
    private String roleName;
    /**
     * 角色描述,备注
     */
    @Length(max = 100, message = "角色描述不得超过100个字符", groups = {RoleDto.insert.class, RoleDto.update.class})
    private String roleDesc;
    /**
     * 状态,0失效 1在用
     */
    private Integer status;
    /**
     * 排序
     */
    private Long showOrder;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 修改时间
     */
    private LocalDateTime updateTime;
}
